package usr;

import book.BookList;
import operation.IOPeration;

/**
 * @Author 12629
 * @Description：
 */
public abstract class User {
    protected String name;
    //此时array没有分配内存
    protected IOPeration[] array;

    public User(String name) {
        this.name = name;
    }

    public abstract int menu();

    public void doWork(int choice, BookList bookList) {
        //array[choice].work(bookList);
        IOPeration ioPeration = array[choice];
        ioPeration.work(bookList);
    }

}
